<style type="text/css">
	#rank-item-1 {
		background-color:red;
	}
	#rank-item-2 {
		background-color:blue;		
	}
	#rank-item-3 {
		background-color:yellow;
	}
</style>
<div class="base-dialog">
	<ul class="list-detail" id="list-cafe-ranking">
		<?php
			if (isset($ranking_list) && count($ranking_list)) {
				$i=0;
				foreach ($ranking_list as $item) {

					if ($i < 3) 
						$html = '<li id="rank-item-' . ($i+1) . '">';
					else 
						$html = '<li>';
						
					$html .= '<img class="thumb-small" src="' . $item['LOGO_IMAGE'] . '" />';
					$html .= '<div class="mul-line">';
					$html .= '<h4><a href="' . base_url() . $item['CAFE_NAME'] . '">' . $item['CAFE_TITLE'] . '</a></h4>';
					$html .= '<p></p>';
					$html .= '</div>';
					$html .= '</li>';					
					
					print $html;
				}
			}
		?>
	</ul>
</div>